package cn.com.dhcc.turbo.entity.registry.wapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import cn.com.dhcc.app.core.handler.dbhandler.WappedResultSet;
import cn.com.dhcc.turbo.entity.registry.NodeInfo;

/**
 * turbo_node_info 节点基本信息表RowWapper
 * 
 * @日期：2014-5-12 上午11:27:38
 * @作者：张洪涛
 * @版权所有：东华软件
 * @版本：1.0
 */
public class NodeInfoRowWapper implements RowMapper<NodeInfo> {
	@Override
	public NodeInfo mapRow(ResultSet rss, int rowNum) throws SQLException {
		WappedResultSet rs = new WappedResultSet(rss);
		NodeInfo vo = new NodeInfo();
		vo.setId(rs.getString("id"));
		vo.setNodeCode(rs.getString("node_code"));
		vo.setNodeName(rs.getString("node_name"));
		vo.setPid(rs.getString("pid"));
		vo.setPcode(rs.getString("pcode"));
		vo.setPname(rs.getString("pname"));
		vo.setIsLocal(rs.getString("islocal"));
		vo.setStatus(rs.getString("status"));
		vo.setMtime(rs.getTimestamp("mtime"));
		vo.setRemark(rs.getString("remark"));
		vo.setInstallUrl(rs.getString("install_url"));
		vo.setOrgType(rs.getString("org_type"));
		vo.setAdminEmail(rs.getString("adminemail"));
		vo.setCont(rs.getString("cont"));
		vo.setNetType(rs.getString("net_type"));
		vo.setHasGap(rs.getString("has_gap"));
		vo.setIsMgrNode(rs.getString("is_mgr_node"));
		vo.setIsrel(rs.getString("isRel"));
		return vo;
	}
}
